﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using DTOTemplatedGenerator.ViewModels;

namespace DTOTemplatedGenerator.Models
{
    public class GeneralTemplateModel: BaseVM
    {
        ObservableCollection<GenTemplateDataModel> _data = new ObservableCollection<GenTemplateDataModel>();

        public ObservableCollection<GenTemplateDataModel> Data { get { return _data; } set { _data = value; } }

        public string DataView
        {
            get
            {
                return string.Join(Environment.NewLine, _data.Select(kv=> kv.Key + " = " + kv.Value));
            }
            set {}
        }

        public string Template { get; set; }        
    }

    public class GenTemplateDataModel
    {
        public string Key { get; set; }
        public string Value { get; set; }
    }
}
